<?=$this->form_eksternal->form_open("", '', 
                      array("id_detail" => $detail[0]->id_outlet))?>
<div id="main-content">
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
        <div class="widget-block">
          <?php
          if($message == 'filed'){
          ?>
          <div class="alert alert-error fade in">
            <button data-dismiss="alert" class="close" type="button">×</button>
            <strong>Filed!</strong> Fail to save data.
          </div>
          <?php
          }
          if($message == 'sukses'){
          ?>
          <div class="alert alert-success fade in">
            <button data-dismiss="alert" class="close" type="button">×</button>
            <strong>Success!</strong> Now you have new user.
          </div>
          <?php
          }
          ?>
          <div class="widget-head">
            <h5><?=$title_table?></h5>
            <div class="widget-control pull-right">
              <a href="#" data-toggle="dropdown" class="btn dropdown-toggle"><i class="icon-cog"></i><b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><a href="<?=  site_url("outlet/aktifitas/detail/".$detail[0]->id_outlet) ?>"><i class="icon-plus"></i> Report Detail</a></li>
                <li><a href="<?=  site_url("outlet/aktifitas/history/".$detail[0]->id_outlet) ?>"><i class="icon-plus"></i> PICA</a></li>
<!--                <li><a href="#"><i class="icon-ok"></i> Active</a></li>
                <li><a href="#"><i class="icon-minus-sign"></i> No-Active</a></li>
                <li><a href="#"><i class="black-icons pdf_document"></i> Export to PDF</a></li>-->
                <li><a href="<?=  site_url("outlet/aktifitas/history-exels/".$detail[0]->id_outlet) ?>"><i class="black-icons excel_document"></i> Export to XLS</a></li>
              </ul>
            </div>
          </div>
          <div class="widget-content">
            <div class="widget-box">
              <table id="table_step" class="table">
                <thead>
                  <tr>
                    <th colspan="4">Step</th>
                    <th>Date</th>
                    <th>PIC</th>
                    <th>Status</th>
                    <th>Note</th>
                  </tr>
                </thead>
                <tbody id="body_step">
                </tbody>
                <tfoot style="background-color: gainsboro">
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td colspan="2">
                      <a onclick="add_row_tambahan_sementara('table_step', '<?=site_url("dev-checklist/add-grand-step")?>', 'body_step', 'param')" class="btn"><i class="black-icons create_write"></i>Add New</a>
                      <div style="display: none" id="param">1</div>
                      <button id="sub_pica" class="btn btn-primary" type="submit" style="display: none">Save</button>
                    </td>
                  </tr>
                </tfoot>
              </table>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
</form>
<script>
  function add_sub(table, site_url, body, param){
    add_row_tambahan(table, site_url, body, param)
    var parameter = $("#"+param).text();
    var fr = parameter.split("|");
//    alert(fr);
    var tmbh = fr[1] * 1 + 1
    $("#"+param).text(fr[0]+"|"+tmbh);
  }
  function add_row_tambahan_sementara(table_pica, site_url, body_pica, param){
    $("#sub_pica").show();
    add_row_tambahan(table_pica, site_url, body_pica, param);
    var param = $("#param").text() * 1;
    $("#param").text(param + 1);
  }
  function sign_user(id){
    $("#"+id).text('<?=$this->session->userdata('name')?>');
  }
  function check(id){
    $("#"+id).show();
  }
  function check(id){
    $("#"+id).show();
  }
</script>